package com.kevin.proxy.dynamicProxy.jdkProxy;

import java.lang.reflect.Proxy;

public class ProxyTest {
    public static void main(String[] args) {
        Target target = (Target) new ProxyO().getProxyO(new TargetImpl());
        target.love();

        Target target1 = new TargetImpl();
        Target proxy = (Target) Proxy.newProxyInstance(target1.getClass().getClassLoader(), target1.getClass().getInterfaces(),new ProxyO(target1));
        proxy.love();
    }
}
